{% set path = link.url is defined ? link.url : path(link.route, link.parameters|default([])) %}

<a class="btn" href="{{ path }}">
    {% if link.icon is defined %}
        <i class="{{ link.icon }} icon"></i>
    {% endif %}
    {{ link.label|trans }}
</a>
